<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: skyblue;
        }
    </style>
    <script src="jquery.min.js"></script>
    <script>
        $(function(){
            $(document).on('click',function(){
                console.log('点击了document');
            });
            $('div').on('click',function(){
                console.log('----------------');
                console.log(e);
                console.log(e.type);
                console.log(e.target);

                // 阻止冒泡
                e.stopPropagation();
 
                // 阻止默认行为
                e.preventDefault();
            });
        })
    </script>
</head>
<body>
    <div></div>
</body>
</html>